package com.junxonline.instant.admin.shiro;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * Jwt Token 实体类
 *
 * @author JunX
 * @date 2021-06-27
 */
@Data
public class JwtToken implements AuthenticationToken {

    private String token;

    public JwtToken(String token) {
        this.token = token;
    }

    @JsonIgnore
    @Override
    public Object getPrincipal() {
        return token;
    }

    @JsonIgnore
    @Override
    public Object getCredentials() {
        return token;
    }

}
